package com.ajaaxx.db.operations;

public class Queries {
	
	public static final String FETCH_USER_DETAILS_QUERY=	"SELECT * FROM USERS WHERE CEDULLA = ?";
	public static final String FETCH_QUESTIONS=				"SELECT * FROM QUESTIONS";
	public static final String FETCH_SUBJECTS_STUDENTS= 	"SELECT SUB.SUBJECT_ID AS ID,SUB.SUBJECT_NAME AS NAME "+
															"FROM SUBJECTS SUB,USERS_SUBJECTS REL WHERE "+
															"SUB.SUBJECT_ID = REL.SUBJECT_ID "+
															"AND REL.CEDULLA = ? "+
															"AND REL.CURRENT_SEMESTER = ?";
	public static final String FETCH_SUBJECTS_OTHERS= 	"SELECT SUB.SUBJECT_ID AS ID,SUB.SUBJECT_NAME AS NAME "+
															"FROM SUBJECTS SUB,USERS_SUBJECTS REL WHERE "+
															"SUB.SUBJECT_ID = REL.SUBJECT_ID "+
															"AND REL.CEDULLA = ? ";
	public static final String FETCH_RELATIONS= 			"SELECT * FROM USERS_SUBJECTS WHERE CEDULLA=? AND CURRENT_SEMESTER=?";
	public static final String SUBMIT_SURVEY= 				"INSERT INTO SURVEY_DATA (RELATION_ENTRY,SURVEY_DATA) VALUES (?,?)";
	public static final String UPDATE_USER_STATUS=			"UPDATE USERS SET SURVEY_STATUS=1 WHERE CEDULLA=? ";
	
}
